package com.zto.sch.advance.aqs;

/**
 * @program: sch-diy-parent
 * @description:
 * @author: sch
 * @create: 2021-01-11 17:41
 **/
public class Main {
    public static int m = 0;

    public static void main(String[] args) throws InterruptedException {
        Thread[] threads = new Thread[1000];
        for (int i = 0; i < threads.length; i++) {
            threads[i] = new Thread(() -> {
                for (int j = 0; j < 100; j++) {
                    m++;
                }
            });
        }

        for (Thread thread : threads) {
            thread.start();
        }

        for (Thread thread : threads) {
            thread.join();
        }

        System.out.println(m);
    }
}
